/**
 * Created by liuhanhui on 2017/9/4.
 */
jQuery.extend({
    ajaxDIY: function (url, params, method, ansync, success, error) {
        $.ajax({
            url: url,
            type: method,
            data: params,
            async: ansync,
            success: function (result) {
                if (typeof success == 'function') {
                    success(result);
                } else {

                }

            },
            error: function (msg) {
                if (error == null) {

                } else {
                    error(msg);
                }
            }
        });
    }
});